const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/azalea', {
  useNewUrlParser: true,
  useUnifiedTopology: true,
  // 使用And连接的sql语句时报警告,
  useFindAndModify: false
}, (err) => {
  if (!err) {
    console.log("连接成功");
  }
  else {
    console.log("连接失败")
  }
});

module.exports = mongoose;